import java.util.Scanner;

/**
 * 11. 星期计算
 * https://www.lanqiao.cn/problems/2140/learning/?page=1&first_category_id=1&tags=2022,%E7%9C%81%E8%B5%9B&tag_relation=intersection&sort=pass_rate&asc=0
 */
public class Main11 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int ret =  (6 + (int)(Math.pow(20,22) % 7)) % 7;
        System.out.println(ret == 0 ? 7 : ret);
        scan.close();
    }
}
